<style scoped lang="less">
</style>
<template>
  <div class="index">
    <Row>
      <Col span="6">
        <Card>
          <p slot="title">表单的基本验证</p>
          <div>
            <form-test />
          </div>
        </Card>
      </Col>
    </Row>
    <Button>测试按钮</Button>
    <Button type="primary" @click="showModal">进行编辑</Button>
    <Modal v-model="modal1" :title="title" @on-ok="ok" @on-cancel="cancel">
      <formHaley />
    </Modal>
  </div>
</template>
<script>
import formHaley from "./form-haley";
import formTest from "./form-test";
export default {
  name: "index",
  components: {
    formHaley,
    formTest
  },
  data() {
    return {
      modal1: false,
      title: ""
    };
  },
  methods: {
    ok() {
      this.$Message.info("Clicked ok");
    },
    cancel() {
      this.$Message.info("Clicked cancel");
    },
    showModal() {
      this.modal1 = true;
      this.title = "编辑个人信息";
    },
    showModalTest() {
      this.modal1 = true;
      this.title = "表单验证";
    }
  }
};
</script>
